home *** CD-ROM | disk | FTP | other *** search
- /*
- File Name..: hstrcat.c
- Date.......: 1-15-1992
- Author.....: Steve Seale ARCO Oil & Gas Co. 76100,2755
-
- Built using QuickC and the C700 libraries.
- */
-
- #define NOCOMM
- #include <windows.h>
- #include <memory.h>
-
- #include "hugearr.h"
-
- /* Concat a huge string (string can go past seg. boundary) */
- /*
- DECLARES for VISUAL BASIC:
- Declare Function VBHugeStrCat Lib "HUGEARR.DLL" (ByVal lptr As Any, ByVal roww As String) As Long
- Declare Function VBHugeStrEnd Lib "HUGEARR.DLL" (ByVal hMem As Integer) As Long
- Declare Function VBHugeLock Lib "HUGEARR.DLL" (ByVal hMem%) As Long
- */
-
- HPBYTE FAR PASCAL
- VBHugeStrCat(HPBYTE hpPtr, LPBYTE lpBuffer)
- {
- LONG lBufLen; /* length of passed string */
-
- /* get length of buffer */
- lBufLen = (LONG) lstrlen(lpBuffer);
-
- /* copy data */
- hmemcpy(hpPtr, lpBuffer, lBufLen );
-
- /* point to end of buffer */
- hpPtr += lstrlen(lpBuffer);
- *(hpPtr + 1) = NULL; /* put NULL at end */
-
- return hpPtr;
-
- }
-
- /* Find the end of a huge string and return the pointer to it */
- HPBYTE FAR PASCAL
- VBHugeStrEnd(HANDLE hMem)
- {
- HPBYTE hPtr; /* pointer to huge string buffer */
-
- /* get starting address */
- hPtr = (HPBYTE) GlobalLock(hMem);
-
- /* find end of huge string */
- while (*hPtr != NULL)
- hPtr = hPtr + 1;
-
- return hPtr;
-
- }
-
- /* return a huge pointer from GlobalLock
- (ie. GlobalLock only returns a FAR pointer .. with no segment stuff, see Petzold)
- */
- HPBYTE FAR PASCAL VBHugeLock(HANDLE hMem)
- {
-
- return (HPBYTE) GlobalLock(hMem);
-
- }
-